#ifndef VRT_CONTROLLER_H
#define VRT_CONTROLLER_H
/*! \~english
    \class VRTController
    \brief Realize user interface and control the caculating procedure.\n
    List of user options are:
    <TABLE>
    <TR><TH> Name </TH><TH> Note </TH><TH> Example </TH></TR>
    <TR><TD> -wl </TD><TD> Wavelenght in micron. </TD><TD> -wl 0.96 </TD></TR>
    <TR><TD> -solar </TD><TD> Solar paramter{intensity, zenith and azimuth}. Intensity multiply PI is energy flux, according to Chandrasekhar's notation; zenith and azimuth is in degree, zenith (90, 180], azimuth[0, 360). Note that zenith and azimuth is truncated to angle steps of algorithm realization.</TD><TD>  -solar 1 143 0</TD></TR>
    <TR><TD> -tau </TD><TD>Optical thickness of aerosol(molecular's part is not in it). </TD><TD> -tau 0.25 </TD></TR>
    <TR><TD> -albedo </TD><TD> Lambert ground's reflective albedo. </TD><TD> -albedo 0.1 </TD></TR>
    <TR><TD> -numlayer </TD><TD> Number of single scattering layers. The more layers is divided, more computer memory and time is needed, and more precise result is got </TD><TD>  -numlayer 200 </TD></TR>
    <TR><TD> -path </TD><TD> Result saving path, you'd better specify a good name for clearity. </TD><TD>  -path result/Aerosol-tau0.25-mu0.8-albedo_0-layer200-smallMain </TD></TR>
    <TR><TD> -m1 </TD><TD> Small aerosol particle's refrective index:{re, im}. The imagin part must be negative or 0.</TD><TD>  -m1 1.5 -0.002 </TD></TR>
    <TR><TD> -m2 </TD><TD> Small aerosol particle's refrective index:{re, im}. The imagin part must be negative or 0.</TD><TD>  -m2 1.3 0 </TD></TR>
    <TR><TD> -radius </TD><TD> Aerosol particle's mean radius:{R_small, R_big}.</TD><TD>  -radius 0.15 10 </TD></TR>
    <TR><TD> -sigma </TD><TD> Standard deviation of aerosol particle's radius:{S_small, S_big}.</TD><TD>  -sigma 0.1 1 </TD></TR>
    <TR><TD> -aerosol_height </TD><TD> Alitude of aerosol atmosphere(bellow  thin-optical-depth top molecular atmosphere):{STANDARD_HEIGHT LOWER_LIMIT UPPER_LIMIT}, unit is  meter.</TD><TD> -aerosol_height 3000 0 10000 </TD></TR>
    </TABLE>
*/
#include <QtCore/QCoreApplication>
#include "atmoslayer/atmoslayer.h"
#include "atmoslayer/toplayer.h"
#include "atmoslayer/groundlayer.h"
#include "atmoslayer/rayleigh_atmosphere.h"
#include "atmoslayer/rayleigh_groundlayer.h"
#include "atmoslayer/rayleigh_toplayer.h"
#include "atmoslayer/aerosol_atmosphere.h"
#include "atmoslayer/aerosol_groundlayer.h"
#include <math.h>
#include <QDebug>
#include <QList>
#include <QStringList>
#include <QString>

typedef QList<AtmosLayer *> Layers;

#include <QObject>
#include <QStringList>

class VRTController : public QObject
{
    Q_OBJECT
public:
    explicit VRTController(QStringList options, QObject *parent = 0);

signals:

public slots:

public:
    static void connectLayers(Layers l);

    AtmosLayer *getTopLayer();

    double getSolarIntensity();
    double getSolarZenith();
    double getSolarAzimuth();

private slots:
    void overActions();

private:
    QStringList m_options;

    Layers m_layers;

    double m_solarIntensity;
    double m_solarZen;
    double m_solarAzi;

    AerosolGroundLayer *m_ground;
};

#endif // VRT_CONTROLLER_H
